﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DK.Sort
{
    public class BubbleSort : ISort
    {

        public void Sort(int[] array)
        {
            for (int i = 0; i < array.Length; i++)
            {
                for (int j = 0; j + 1 < array.Length - i; j++)
                {
                    if (array[j] > array[j + 1]) 
                    {
                        ISort.Transfrom(array, j, j + 1);
                    }
                }
            }
        }
    }
}
